<template>
  <div class="hover-tips-wrap">
    <span class="tips-content">Hello World !</span>
    <span class="tips-arrow-down"></span>
  </div>
</template>

<script>
  export default {
    name: 'Tooltip'
  }
</script>

<style lang="scss" scoped>
  .hover-tips-wrap {
    position: relative;
    display: inline-block;
    margin-top: 20px;
    margin-left: 10px;

    .tips-content {
      display: inline-block;
      width: auto;
      height: 26px;
      padding: 0 10px;
      color: #fff;
      font-size: 12px;
      line-height: 25px;
      white-space: nowrap;
      text-align: center;
      background: #4191ef;
      border-radius: 2px;
      box-shadow: 1px 1px 2px #d4d4d4;
    }

    .tips-arrow-down {
      position: absolute;
      top: 26px;
      left: 50%;
      display: inline-block;
      width: 0;
      height: 0;
      margin-left: -4px;
      font-size: 0;
      border-color: #4191ef transparent transparent;
      border-style: solid;
      border-width: 4px;
      transform: translateX(-50%);
    }
  }
</style>
